package com.xinchengxd.order.service;

import com.xinchengxd.commons.ResponseResult;
import com.xinchengxd.commons.entity.dto.GoodsNums;
import com.xinchengxd.commons.entity.goods.Goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("service-goods")
public interface GoodsService {

    @PostMapping("/goods/findByList")
    public ResponseResult<List<Goods>> getPrice(@RequestBody List<GoodsNums> item);

    @GetMapping("/goods/stock")
    public ResponseResult<String> updateStock(@RequestParam int id,@RequestParam int num);

}
